<template>
<div>
    <h4>递归组件</h4>
        <Digui
        :arr="datas"
        />
</div>
</template>
    
<script setup lang='ts'>
import { reactive } from '@vue/reactivity'
import Digui from '../components/digui.vue'
type List = {
    id: string,
    text: string,
    children?: List[]
}
const datas = reactive<List[]>([
      { id: "1", text: "菜单1", children: [
          {
            id: "2", text: "菜单1-1",children: [
                  {id: "3",  text: "菜单1-1-1"},
                  {id: "3",  text: "菜单1-1-2"}
                ],
          },
        ],
      },
      { id: "2",text: "菜单2"}
    ])
</script>
    
<style>
    
</style>